package br.org.bertol.mestrado.engine.optimisation.pso;


public class Velocity 
{
	private int par1;

	private int par2;

	public Velocity(final int par1, final int par2) 
	{
		this.par1 = par1;
		
		this.par2 = par2;
		
	}
	
	public int getPar1() 
	{
		return par1;
	}

	public int getPar2() 
	{
		return par2;
	}

	public void setPar2(int par2) 
	{
		this.par2 = par2;
	}

	public void setPar1(int par1) 
	{
		this.par1 = par1;
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString() {
		
		final StringBuilder buffer = new StringBuilder();
		
		buffer.append("[PAR : " + par1 + " - "+par2 +" ]");
		
		return buffer.toString();
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + par1;
		result = prime * result + par2;
		return result;
	}
	
	/**
	 * {@inheritDoc}
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Velocity))
			return false;
		Velocity other = (Velocity) obj;
		if (par1 != other.par1)
			return false;
		if (par2 != other.par2)
			return false;
		return true;
	}

	
}
